{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}R:\WSV2\TBu_AKe\Spatial_NEW\welfare_3D_plot_complete.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}11 Apr 2023, 17:42:47
{txt}
{com}. 
. 
. cd "R:\WSV2\TBu_AKe\Spatial_NEW\Welfare"
{res}R:\WSV2\TBu_AKe\Spatial_NEW\Welfare
{txt}
{com}. 
. capture ssc install 3dplot
{txt}
{com}. 
. 
.         ** 20x20 matrix over sigma and kappa for all outcomes 
. use E // energy savings 
{txt}
{com}. 
. gen n = _n // merge would re-order obs 
{txt}
{com}. 
. forvalues s = 1(1)20 {c -(}
{txt}  2{com}.         rename c`s' e`s' // rename 
{txt}  3{com}. {c )-}
{res}{txt}
{com}. 
. merge 1:1 _rowname using V // merge with V (utility loss)
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}              20{txt}  (_merge==3)
{col 5}{hline 41}

{com}. 
. drop _merge 
{txt}
{com}. 
. sort n
{txt}
{com}. 
. forvalues s = 1(1)20 {c -(}
{txt}  2{com}.         rename c`s' v`s' // rename 
{txt}  3{com}. {c )-}
{res}{txt}
{com}. 
. 
. merge 1:1 _rowname using W // merge with W (sales weights)
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}              20{txt}  (_merge==3)
{col 5}{hline 41}

{com}. 
. drop _merge 
{txt}
{com}. 
. sort n
{txt}
{com}. 
. forvalues s = 1(1)20 {c -(}
{txt}  2{com}.         rename c`s' w`s' // rename 
{txt}  3{com}. {c )-}
{res}{txt}
{com}. 
. merge 1:1 _rowname using P // merge with P (restriction: yes/no)
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}              20{txt}  (_merge==3)
{col 5}{hline 41}

{com}. 
. drop _merge 
{txt}
{com}. 
. sort n
{txt}
{com}. 
. forvalues s = 1(1)20 {c -(}
{txt}  2{com}.         rename c`s' p`s' // rename 
{txt}  3{com}. {c )-}
{res}{txt}
{com}. 
.         ** fix data structure 
. gen kappa = _n
{txt}
{com}. gen sigma = _n
{txt}
{com}. 
. gen E_sum_R = . 
{txt}(20 missing values generated)

{com}. gen U_ratio = . 
{txt}(20 missing values generated)

{com}. 
. gen R_ratio = . 
{txt}(20 missing values generated)

{com}. gen P_ratio = . 
{txt}(20 missing values generated)

{com}. 
. fillin kappa sigma // data are placed as matrix, need long-form with 3 variables  
{txt}
{com}. 
.         ** fill outcome variable over all combinations 
. forvalues s = 1(1)20 {c -(}
{txt}  2{com}. 
. sort kappa v`s'
{txt}  3{com}. bysort kappa: carryforward v`s', replace
{txt}  4{com}. 
. sort kappa e`s'
{txt}  5{com}. bysort kappa: carryforward e`s', replace
{txt}  6{com}. 
. sort kappa w`s'
{txt}  7{com}. bysort kappa: carryforward w`s', replace
{txt}  8{com}. 
. sort kappa p`s'
{txt}  9{com}. bysort kappa: carryforward p`s', replace
{txt} 10{com}. 
. {c )-}
v1:  {txt}(380 real changes made)
{res}e1:  {txt}(380 real changes made)
{res}w1:  {txt}(380 real changes made)
{res}p1:  {txt}(380 real changes made)
{res}v2:  {txt}(380 real changes made)
{res}e2:  {txt}(380 real changes made)
{res}w2:  {txt}(380 real changes made)
{res}p2:  {txt}(380 real changes made)
{res}v3:  {txt}(380 real changes made)
{res}e3:  {txt}(380 real changes made)
{res}w3:  {txt}(380 real changes made)
{res}p3:  {txt}(380 real changes made)
{res}v4:  {txt}(380 real changes made)
{res}e4:  {txt}(380 real changes made)
{res}w4:  {txt}(380 real changes made)
{res}p4:  {txt}(380 real changes made)
{res}v5:  {txt}(380 real changes made)
{res}e5:  {txt}(380 real changes made)
{res}w5:  {txt}(380 real changes made)
{res}p5:  {txt}(380 real changes made)
{res}v6:  {txt}(380 real changes made)
{res}e6:  {txt}(380 real changes made)
{res}w6:  {txt}(380 real changes made)
{res}p6:  {txt}(380 real changes made)
{res}v7:  {txt}(380 real changes made)
{res}e7:  {txt}(380 real changes made)
{res}w7:  {txt}(380 real changes made)
{res}p7:  {txt}(380 real changes made)
{res}v8:  {txt}(380 real changes made)
{res}e8:  {txt}(380 real changes made)
{res}w8:  {txt}(380 real changes made)
{res}p8:  {txt}(380 real changes made)
{res}v9:  {txt}(380 real changes made)
{res}e9:  {txt}(380 real changes made)
{res}w9:  {txt}(380 real changes made)
{res}p9:  {txt}(380 real changes made)
{res}v10:  {txt}(380 real changes made)
{res}e10:  {txt}(380 real changes made)
{res}w10:  {txt}(380 real changes made)
{res}p10:  {txt}(380 real changes made)
{res}v11:  {txt}(380 real changes made)
{res}e11:  {txt}(380 real changes made)
{res}w11:  {txt}(380 real changes made)
{res}p11:  {txt}(380 real changes made)
{res}v12:  {txt}(380 real changes made)
{res}e12:  {txt}(380 real changes made)
{res}w12:  {txt}(380 real changes made)
{res}p12:  {txt}(380 real changes made)
{res}v13:  {txt}(380 real changes made)
{res}e13:  {txt}(380 real changes made)
{res}w13:  {txt}(380 real changes made)
{res}p13:  {txt}(380 real changes made)
{res}v14:  {txt}(380 real changes made)
{res}e14:  {txt}(380 real changes made)
{res}w14:  {txt}(380 real changes made)
{res}p14:  {txt}(380 real changes made)
{res}v15:  {txt}(380 real changes made)
{res}e15:  {txt}(380 real changes made)
{res}w15:  {txt}(380 real changes made)
{res}p15:  {txt}(380 real changes made)
{res}v16:  {txt}(361 real changes made)
{res}e16:  {txt}(380 real changes made)
{res}w16:  {txt}(380 real changes made)
{res}p16:  {txt}(380 real changes made)
{res}v17:  {txt}(342 real changes made)
{res}e17:  {txt}(380 real changes made)
{res}w17:  {txt}(380 real changes made)
{res}p17:  {txt}(380 real changes made)
{res}v18:  {txt}(342 real changes made)
{res}e18:  {txt}(380 real changes made)
{res}w18:  {txt}(380 real changes made)
{res}p18:  {txt}(380 real changes made)
{res}v19:  {txt}(323 real changes made)
{res}e19:  {txt}(361 real changes made)
{res}w19:  {txt}(361 real changes made)
{res}p19:  {txt}(361 real changes made)
{res}v20:  {txt}(304 real changes made)
{res}e20:  {txt}(361 real changes made)
{res}w20:  {txt}(361 real changes made)
{res}p20:  {txt}(361 real changes made)
{res}{txt}
{com}. 
.         ** place column values into single variable for long format 
. forvalues k = 1(1)20 {c -(}
{txt}  2{com}.         forvalues s = 1(1)20 {c -(}
{txt}  3{com}.                 
.         replace E_sum_R = e`s' if sigma == `s' & kappa == `k' 
{txt}  4{com}.         replace U_ratio = v`s' if sigma == `s' & kappa == `k' 
{txt}  5{com}.         
.         replace R_ratio = w`s' if sigma == `s' & kappa == `k' 
{txt}  6{com}.         replace P_ratio = p`s' if sigma == `s' & kappa == `k' 
{txt}  7{com}.                 {c )-}
{txt}  8{com}.         {c )-}
{txt}(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(0 real changes made)
(1 real change made)
(1 real change made)
(1 real change made)
(0 real changes made)
(1 real change made)
(1 real change made)
(1 real change made)
(0 real changes made)
(1 real change made)
(1 real change made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(0 real changes made)
(1 real change made)
(1 real change made)
(1 real change made)
(0 real changes made)
(1 real change made)
(1 real change made)
(1 real change made)
(0 real changes made)
(1 real change made)
(1 real change made)
(1 real change made)
(0 real changes made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(0 real changes made)
(1 real change made)
(1 real change made)
(1 real change made)
(0 real changes made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(0 real changes made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

{com}. 
.         
. gen k_index = kappa 
{txt}
{com}. gen s_index = sigma 
{txt}
{com}. replace kappa = 3+ kappa*0.1-0.1
{txt}(400 real changes made)

{com}. replace sigma = sigma*0.01-0.01
{txt}(400 real changes made)

{com}. 
. sort kappa sigma 
{txt}
{com}. 
. save welfare_20x20, replace 
{txt}{p 0 4 2}
file {bf}
welfare_20x20.dta{rm}
saved
{p_end}

{com}. 
. *use Welfare_3D_0802, replace
. 
. 
.         *** implement 3D: scale outcomes 
. sum U_ratio 

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}        388    .1701794    .1009101   .0022015   .5915121
{txt}
{com}. gen U_ratio2 = U_ratio*10 // roughly on 0 to 6 scale 
{txt}(12 missing values generated)

{com}. 
. sum E_sum_R 

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}E_sum_R {c |}{res}        398    372636.2    677779.1          0    3073453
{txt}
{com}. 
. scalar sc =  3073453/5.915121 // scale factor 
{txt}
{com}. 
. gen E_sum_2 = E_sum_R/`=sc'
{txt}(2 missing values generated)

{com}. sum E_sum_2 

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}E_sum_2 {c |}{res}        398      .71717    1.304443          0    5.91512
{txt}
{com}. 
. sum P_ratio R_ratio 

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}P_ratio {c |}{res}        398     .342153    .4293549          0          1
{txt}{space 5}R_ratio {c |}{res}        398    .3328138    .4381092          0          1
{txt}
{com}. 
. gen P_ratio2 = P_ratio*6 // max to 6. 
{txt}(2 missing values generated)

{com}. 
. gen R_ratio2 = R_ratio*6 
{txt}(2 missing values generated)

{com}. 
. sort sigma kappa 
{txt}
{com}. 
.                 *******************
.                 **** 3D Plots *****
.                 *******************
. cd "$graphs" 
{res}R:\WSV2\TBu_AKe\Spatial_NEW\Graphs
{txt}
{com}.                 
.                 ** private marginal utility loss 
. xtset s_index k_index // treat sigma as panel, kappa as time. 
{res}
{col 1}{txt:Panel variable: }{res:s_index}{txt: (strongly balanced)}
{p 1 16 2}{txt:Time variable: }{res:k_index}{txt:, }{res:{bind:1}}{txt: to }{res:{bind:20}}{p_end}
{txt}{col 10}Delta: {res}1 unit
{txt}
{com}. gen V_sum_R = U_ratio*E_sum_R
{txt}(12 missing values generated)

{com}. gen lV = L1.V_sum_R 
{txt}(32 missing values generated)

{com}. gen dV = ln(V_sum_R) - ln(lV) // at group_id = 2: percentage change in V_sum_R as sigma increases from zero. 
{txt}(32 missing values generated)

{com}. gen dV2 = V_sum_R - lV 
{txt}(32 missing values generated)

{com}. 
. gen lE = L1.E_sum_R 
{txt}(22 missing values generated)

{com}. gen dE = ln(E_sum_R) - ln(lE) // at group_id = 2: percentage change in V_sum_R aa sigma increases from zero. 
{txt}(32 missing values generated)

{com}. gen dE2 = E_sum_R - lE
{txt}(22 missing values generated)

{com}. 
. gen d_VE_k = dV2/dE2
{txt}(32 missing values generated)

{com}. sum d_VE_k

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 6}d_VE_k {c |}{res}        368     .248443    .2076397   .0363505   1.124038
{txt}
{com}. 
. gen x = 5.91/1.13 // scale factor
{txt}
{com}. gen d_VE_2 = d_VE_k*x // scaling to get cube proportions 
{txt}(32 missing values generated)

{com}. sum d_VE_2

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 6}d_VE_2 {c |}{res}        368    1.299379    1.085974   .1901163   5.878817
{txt}
{com}. 
.                 *** Private marginal utility loss
. graph3d s_index d_VE_2 k_index, cuboid innergrid wire colorscheme(bcgyr) xlab("") ylab("") zlab("") xlang(10) ylang(90) zlang(310) xlpos(2) ylpos(2) zlpos(9) xang(12) yang(240) blv format("%12.0fc") equi markeroptions(msize(1.2)) 
{res}{txt}
{com}. 
. graph save       3D_VE_wire.gph, replace
{res}{txt}file {bf:3D_VE_wire.gph} saved

{com}. graph export 3D_VE_wire.eps, as(eps) fontface("Baskerville Old Face") replace
{txt}{p 0 4 2}
file {bf}
3D_VE_wire.eps{rm}
saved as
EPS
format
{p_end}

{com}. graph export 3D_VE_wire.png, as(png) width(1500) replace                        
{txt}{p 0 4 2}
file {bf}
3D_VE_wire.png{rm}
saved as
PNG
format
{p_end}

{com}.                         
.                 *** Utility ratio 
. graph3d s_index U_ratio2 k_index, cuboid innergrid wire colorscheme(bcgyr) xlab("") ylab("") zlab("") xlang(10) ylang(90) zlang(310) xlpos(2) ylpos(2) zlpos(9) xang(12) yang(240) blv format("%12.0fc") equi markeroptions(msize(1.2))  
{res}{txt}
{com}. 
. graph save       3D_V_wire.gph, replace
{res}{txt}file {bf:3D_V_wire.gph} saved

{com}. graph export 3D_V_wire.eps, as(eps) fontface("Baskerville Old Face") replace
{txt}{p 0 4 2}
file {bf}
3D_V_wire.eps{rm}
saved as
EPS
format
{p_end}

{com}. graph export 3D_V_wire.png, as(png) width(1500) replace 
{txt}{p 0 4 2}
file {bf}
3D_V_wire.png{rm}
saved as
PNG
format
{p_end}

{com}. 
.                 *** Proportion of restricted sales 
. graph3d s_index P_ratio2 k_index, cuboid innergrid wire colorscheme(bcgyr) xlab("") ylab("") zlab("") xlang(10) ylang(90) zlang(310) xlpos(2) ylpos(2) zlpos(9) xang(12) yang(232) blv format("%12.0fc") markeroptions(msize(1.2))  
{res}{txt}
{com}. 
. graph save       3D_R_wire.gph, replace
{res}{txt}file {bf:3D_R_wire.gph} saved

{com}. graph export 3D_R_wire.eps, as(eps) fontface("Baskerville Old Face") replace
{txt}{p 0 4 2}
file {bf}
3D_R_wire.eps{rm}
saved as
EPS
format
{p_end}

{com}. graph export 3D_R_wire.png, as(png) width(1500) replace 
{txt}{p 0 4 2}
file {bf}
3D_R_wire.png{rm}
saved as
PNG
format
{p_end}

{com}. 
. 
. graph3d s_index P_ratio2 k_index, cuboid innergrid wire colorscheme(bcgyr) xlab("") ylab("") zlab("") xlang(10) ylang(90) zlang(310) xlpos(2) ylpos(2) zlpos(9) xang(12) yang(210)  blv format("%12.0fc") markeroptions(msize(1.2))  
{res}{txt}
{com}. 
. graph save       3D_R_wire210.gph, replace
{res}{txt}file {bf:3D_R_wire210.gph} saved

{com}. graph export 3D_R_wire210.eps, as(eps) fontface("Baskerville Old Face") replace
{txt}{p 0 4 2}
file {bf}
3D_R_wire210.eps{rm}
saved as
EPS
format
{p_end}

{com}. graph export 3D_R_wire210.png, as(png) width(1500) replace      
{txt}{p 0 4 2}
file {bf}
3D_R_wire210.png{rm}
saved as
PNG
format
{p_end}

{com}. 
. 
.                 *** Energy Savings  
. graph3d s_index E_sum_2 k_index, cuboid innergrid wire colorscheme(bcgyr) xlab("") ylab("") zlab("") xlang(10) ylang(90) zlang(310) xlpos(2) ylpos(2) zlpos(9) xang(12) yang(235) blv format("%12.0fc") equi markeroptions(msize(1.2))  
{p 0 4 2}
{txt}(note:  named style
0 255 -1 not found in class
color,  default attributes used)
{p_end}
{p 0 4 2}
{txt}(note:  named style
0 255 -1 not found in class
color,  default attributes used)
{p_end}
{res}{txt}
{com}. 
. graph save       3D_E_wire.gph, replace
{res}{txt}file {bf:3D_E_wire.gph} saved

{com}. graph export 3D_E_wire.eps, as(eps) fontface("Baskerville Old Face") replace
{txt}{p 0 4 2}
file {bf}
3D_E_wire.eps{rm}
saved as
EPS
format
{p_end}

{com}. graph export 3D_E_wire.png, as(png) width(1500) replace 
{txt}{p 0 4 2}
file {bf}
3D_E_wire.png{rm}
saved as
PNG
format
{p_end}

{com}. 
.         
.         ***********************
.         **** Contour Plots ****
.         ***********************
.         
. /* 
> clear 
> use welfare_100x100, replace // 100x100 simulation 
> */ 
.         
.                 *** Private marginal utility loss  
. twoway contour d_VE_k sigma kappa, yscale(reverse) color(hue%60) ecolor(red) colorlines levels(50) ztitle("") zlabel(0 0.09 "ABR (0.09)" 0.5 "0.5" 0.68 "Flat (0.68)" 1.12 "Max (1.12)", format(%9.2f) labsize(small)) xlabel(3 4.407 "4.407" 5, labsize(small)) ylabel(0 0.126 "0.126" 0.20, labsize(small)) ytitle("") xtitle("") name(ctour_VE, replace) graphregion(color(white))
{p 0 4 2}
{txt}(note:  named style
hue not found in class
color,  default attributes used)
{p_end}
{p 0 4 2}
{txt}(note:  named style
hue not found in class
color,  default attributes used)
{p_end}
{p 0 4 2}
{txt}(note:  named style
hue not found in class
color,  default attributes used)
{p_end}
{p 0 4 2}
{txt}(note:  named style
hue not found in class
color,  default attributes used)
{p_end}
{p 0 4 2}
{txt}(note:  named style
hue not found in class
color,  default attributes used)
{p_end}
{res}{txt}
{com}. 
. graph save       Contour_VE.gph, replace
{res}{txt}file {bf:Contour_VE.gph} saved

{com}. graph export Contour_VE.eps, as(eps) fontface("Baskerville Old Face") replace
{txt}{p 0 4 2}
file {bf}
Contour_VE.eps{rm}
saved as
EPS
format
{p_end}

{com}. graph export Contour_VE.png, as(png) width(1500) replace        
{txt}{p 0 4 2}
file {bf}
Contour_VE.png{rm}
saved as
PNG
format
{p_end}

{com}. 
. 
.                 *** Utility ratio 
. twoway contour U_ratio sigma kappa, yscale(reverse) color(hue%75) ecolor(red) colorlines ccuts(0(0.05)0.6) ztitle("Loss per Unit of Energy Savings")  zlabel(0 0.133 "ABR (0.13)" 0.20 0.352 "Flat (0.35)" 0.40 .60, format(%9.2f) labsize(small)) xlabel(3 4.407 "4.407" 5, labsize(small)) ylabel(0 0.126 "0.126" 0.20, labsize(small)) ytitle("") xtitle("") name(ctour_V, replace) graphregion(color(white))
{p 0 4 2}
{txt}(note:  named style
hue not found in class
color,  default attributes used)
{p_end}
{p 0 4 2}
{txt}(note:  named style
hue not found in class
color,  default attributes used)
{p_end}
{p 0 4 2}
{txt}(note:  named style
hue not found in class
color,  default attributes used)
{p_end}
{p 0 4 2}
{txt}(note:  named style
hue not found in class
color,  default attributes used)
{p_end}
{p 0 4 2}
{txt}(note:  named style
hue not found in class
color,  default attributes used)
{p_end}
{res}{txt}
{com}. 
. graph save       Contour_V.gph, replace
{res}{txt}file {bf:Contour_V.gph} saved

{com}. graph export Contour_V.eps, as(eps) fontface("Baskerville Old Face") replace
{txt}{p 0 4 2}
file {bf}
Contour_V.eps{rm}
saved as
EPS
format
{p_end}

{com}. graph export Contour_V.png, as(png) width(1500) replace 
{txt}{p 0 4 2}
file {bf}
Contour_V.png{rm}
saved as
PNG
format
{p_end}

{com}. 
. 
. 
.         *** Energy Savings 
. twoway contour E_sum_R sigma kappa  if E_sum_R, yscale(reverse) color(hue%60) ecolor(red) colorlines levels(50) ztitle("Total Energy Savings") zlabel(0 90000 "ABR (39 K)" 1000000 "1.0 M" 1801995 "Flat (1.8 M)" 3000000 "3.0 M", format(%9.2f) labsize(small)) xlabel(3 4.407 "4.407" 5, labsize(small)) ylabel(0 0.126 "0.126" 0.20, labsize(small)) ytitle("") xtitle("") name(ctour_E, replace) graphregion(color(white))
{p 0 4 2}
{txt}(note:  named style
hue not found in class
color,  default attributes used)
{p_end}
{p 0 4 2}
{txt}(note:  named style
hue not found in class
color,  default attributes used)
{p_end}
{p 0 4 2}
{txt}(note:  named style
hue not found in class
color,  default attributes used)
{p_end}
{p 0 4 2}
{txt}(note:  named style
hue not found in class
color,  default attributes used)
{p_end}
{p 0 4 2}
{txt}(note:  named style
hue not found in class
color,  default attributes used)
{p_end}
{res}{txt}
{com}. 
. graph save       Contour_E.gph, replace
{res}{txt}file {bf:Contour_E.gph} saved

{com}. graph export Contour_E.eps, as(eps) fontface("Baskerville Old Face") replace
{txt}{p 0 4 2}
file {bf}
Contour_E.eps{rm}
saved as
EPS
format
{p_end}

{com}. graph export Contour_E.png, as(png) width(1500) replace 
{txt}{p 0 4 2}
file {bf}
Contour_E.png{rm}
saved as
PNG
format
{p_end}

{com}. 
. 
.         *** Proportion of affected Sales 
. twoway contour R_ratio sigma kappa, yscale(reverse) color(hue%60) ecolor(red) colorlines levels(50) ztitle("Fraction of Sales under Restriction") zlabel(0 0.21 "ABR (0.21)" 0.5  1, format(%9.2f) labsize(small)) xlabel(3 4.407 "4.407" 5, labsize(small)) ylabel(0 0.126 "0.126" 0.20, labsize(small)) ytitle("") xtitle("") name(ctour_R, replace) graphregion(color(white))
{p 0 4 2}
{txt}(note:  named style
hue not found in class
color,  default attributes used)
{p_end}
{p 0 4 2}
{txt}(note:  named style
hue not found in class
color,  default attributes used)
{p_end}
{p 0 4 2}
{txt}(note:  named style
hue not found in class
color,  default attributes used)
{p_end}
{p 0 4 2}
{txt}(note:  named style
hue not found in class
color,  default attributes used)
{p_end}
{p 0 4 2}
{txt}(note:  named style
hue not found in class
color,  default attributes used)
{p_end}
{res}{txt}
{com}.         
. graph save       Contour_R.gph, replace
{res}{txt}file {bf:Contour_R.gph} saved

{com}. graph export Contour_R.eps, as(eps) fontface("Baskerville Old Face") replace
{txt}{p 0 4 2}
file {bf}
Contour_R.eps{rm}
saved as
EPS
format
{p_end}

{com}. graph export Contour_R.png, as(png) width(1500) replace 
{txt}{p 0 4 2}
file {bf}
Contour_R.png{rm}
saved as
PNG
format
{p_end}

{com}. 
. 
. log close 
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}R:\WSV2\TBu_AKe\Spatial_NEW\welfare_3D_plot_complete.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res}11 Apr 2023, 17:44:32
{txt}{.-}
{smcl}
{txt}{sf}{ul off}